var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.updateInfoQuest(61333, "act1=610061570;act2=610062000");
            cm.curNodeEventEnd(true);
            cm.eventSKill(0);
            cm.setInGameDirectionMode(true, false, true);
            cm.setStandAloneMode(true);
            cm.npc_ChangeController(9201536, "oid=2661960", -697, 97, 6, -747, -647, 0, true, 0, false);
            cm.npc_SetSpecialAction("oid=2661960", "summon", 0, 0);
            cm.fieldEffect_PlayFieldSound("Sound/SoundEff.img/blackHeaven/text", 100);
            cm.inGameDirectionEvent_AskAnswerTime(6200);
            cm.curNodeEventEnd(true);
            cm.effect_Text(["#fn黑体##fs20#第2幕.1000多年前"], [100, 3000, 4, 0, 0, 1, 4, 0, 0, 0, 0])
        } else {
            if (status === a++) {
                cm.inGameDirectionEvent_ForcedFlip(-1);
                cm.sendNormalTalk_Bottom("进去前我们得先料理这些怪物。", 57, 0, false, true)
            } else {
                if (status === a++) {
                    cm.sendNormalTalk_Bottom("不过你还受着伤，所以说，交给我好了。", 57, 0, true, true)
                } else {
                    if (status === a++) {
                        cm.inGameDirectionEvent_AskAnswerTime(1200)
                    } else {
                        if (status === a++) {
                            cm.sendNormalTalk_Bottom("#face0#祝你好运，朋友。", 37, 9201536, false, true)
                        } else {
                            if (status === a++) {
                                cm.inGameDirectionEvent_ForcedFlip(1);
                                cm.inGameDirectionEvent_AskAnswerTime(500)
                            } else {
                                if (status === a++) {
                                    cm.npc_SetForceMove("oid=2661960", 1, 700, 80);
                                    cm.eventSKill(0);
                                    cm.setInGameDirectionMode(false, true, false);
                                    cm.dispose()
                                }
                            }
                        }
                    }
                }
            }
        }
    }
};